<?php
/**
 * Created by PhpStorm.
 * User: jinjb
 * Date: 2015/6/3
 * Time: 16:07
 */

namespace business\procurement\models;

use business\base\models\BaseActiveRecord;
/**
* @property string itemId
* @property string recruitId
* @property string name
* @property string registerCondition
* @property string orderNum
* @property string scopeIntroduce
* @property string registerEndDate
* @property string categories
* @property string serviceQuals
* @property string serviceAreas
 * @property string serviceProvince
 * @property string registerFund
* @property string buildYears
* @property string caseNum
* @property bool isAreaValidCase
* @property string isAllowInspect
* @property string provideOrganizationCode
* @property string provideTaxRegistration
* @property string providerQualification
* @property string providerMainBusiness
* @property string providerCompanyContact
* @property string providerBrand
* @property string providerNearlyCase
* @property string providerEnterpriseHonor
* @property string othersCondition
* @property string state
* @property string userId
* @property string managerUserId
* @property string managerName
* @property string managerPostion
* @property string managerTelephone
* @property string managerMobile
* @property string managerQQ
* @property string managerMail
* @property string companyId
* @property string createTime
* @property string source
* @property string auditTime
* @property string auditUserId
* @property string auditUsername
* @property string lastModifyTime
* @property string subject
* @property string publishTime
 * @property string serviceAreaNames
 * @property string serviceQualsName
 *@property  array recruitItemDocuments
 * @property string app_user_id
 */
class RecruitItemModel extends BaseActiveRecord
{
    const SOURCE_APP=3;

    public static function  tableName()
    {
        return "b2b_bidding.bid_recruit_item";
    }

    public function getRecruitRegister()
    {
        return $this->hasMany(RecruitRegisterModel::className(),['item_id'=>'item_id']);
    }

    public $_fieldsAlias = [
        'itemId' => 'item_id',
        'recruitId' => 'recruit_id',
        'name' => 'name',
        'registerCondition' => 'register_condition',
        'orderNum' => 'order_num',
        'scopeIntroduce' => 'scope_introduce',
        'registerEndDate' => 'register_end_date',
        'categories' => 'categories',
        'serviceQuals' => 'service_quals',
        'serviceAreas' => 'service_areas',
        'serviceProvince'=>'service_province',
        'companyAreas' => 'company_area',
        'registerFund' => 'register_fund',
        'buildYears' => 'build_years',
        'caseNum' => 'case_num',
        'isAreaValidCase' => 'is_area_valid_case',
        'isAllowInspect' => 'is_allow_inspect',
        'provideOrganizationCode' => 'provide_organization_code',
        'provideTaxRegistration' => 'provide_tax_registration',
        'providerQualification' => 'provider_qualification',
        'providerMainBusiness' => 'provider_main_business',
        'providerCompanyContact' => 'provider_company_contact',
        'providerBrand' => 'provider_brand',
        'providerNearlyCase' => 'provider_nearly_case',
        'providerEnterpriseHonor' => 'provider_enterprise_honor',
        'othersCondition' => 'others_condition',
        'state' => 'state',
        'userId' => 'user_id',
        'managerUserId' => 'manager_user_id',
        'managerUserMobile'=>'manager_user_mobile',
        'managerName' => 'manager_name',
        'managerPostion' => 'manager_postion',
        'managerTelephone' => 'manager_telephone',
        'managerMobile' => 'manager_mobile',
        'managerMail' => 'manager_mail',
        'companyId' => 'company_id',
        'createTime' => 'create_time',
        'source' => 'source',
        'auditTime' => 'audit_time',
        'auditUserId' => 'audit_userid',
        'auditUsername' => 'audit_username',
        'lastModifyTime' => 'last_modify_time',
        'subject' => 'subject',
        'publishTime' => 'publish_time',
        'managerQQ'=>'manager_qq',
        'auditTag'=>'audit_tag',
        'supplierType'=>'supplier_type',
        'merit'=>'merit',
        'limitThreeYearsCase'=>'limit_three_years_case',
        'coveredArea'=>'covered_area',
        'appUserId' => 'app_user_id'
    ];

    public $_recruitItemArea;

    public $_registerCount;

    public $_pageViewCount;

    public function setRecruitItemArea($value)
    {
        $this->_recruitItemArea=$value;
    }
    public function getRecruitItemArea()
    {
        return $this->_recruitItemArea;
    }

    public function setRegisterCount($value)
    {
        $this->_registerCount=$value;
    }
    public function getRegisterCount()
    {
        return $this->_registerCount;
    }

    public function setPageViewCount($value)
    {
        $this->_pageViewCount=$value;
    }
    public function getPageViewCount()
    {
        return $this->_pageViewCount;
    }

    public $recruitItemArea;

    public $serviceAreaNames;

    public $recruitItemDocuments;

    public $serviceQualsName;

    public $recruitCompanyAreas;

    public $managerTelephoneAreaCode;

    public $editSource;
}